<?php
class Apps_Controller_Action_Provider extends Apps_Controller_Action {
	public static $msgUpdateSuccess = array('success' => 'updated successfully! ^.^');
	public static $msgUpdateFailed  = array('failed'  => 'update failed..');
	public static $msgAddSuccess    = array('success' => 'added successfully! ^.^');
	public static $msgAddFailed     = array('failed'  => 'add failed..');
	
	protected $_namespaceRequestedParams = 'App.Provider';
	protected $_namespaceFlashMessenger  = Apps_View_Helper_FlashMessenger::NAMESPACE_PROVIDER; 
	
	protected $_table;	
	
	protected function __preDispatch() {
		// Authentication		
		$this->_auth = $auth = Apps_Auth::getInstanceProvider();
		if($auth && $auth->hasIdentity()) {
	        $this->view->app_auth = $this->_auth;	        
		} else if($this->_request->getActionName() != 'in') {
            $this->saveRequestedParams();        
            $this->_helper->redirector('in', 'a');
		}        
	}
	
	public function goToIndexAction($params = array()) {
		$this->_helper->redirector('', null, null, $params);
	}
	public function goToIndexController($params = array()) {
		$this->_helper->redirector('', '', null, $params);
	}
}